FileChooserWidget: Fix leaks in .get_subtitle()
authorDaniel Boles <dboles@src.gnome.org>
Tue, 13 Mar 2018 00:19:51 +0000 (00:19 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Tue, 13 Mar 2018 00:19:51 +0000 (00:19 +0000)
commit0f3396d7423d9f76506f91ac8a97adc1df5cf50f
treeca0322637c9d7ec9be5977fffaa739d310632cd2
parent9d8fadee976d589645663eade2b83258ed0a005e
FileChooserWidget: Fix leaks in .get_subtitle()

Now that subtitle's default value "Searching" for OPERATION_MODE_SEARCH
is duplicated as it should be, we cannot reassign other strings to it
anymore, as that resulted in the original dupe of "Searching" leaking.

Fix this by only assigning the dup'd "Searching" after trying to get
more specific values, not before. We therefore need to set it to NULL
during its declaration, and that means we needn't in the final else.
gtk/gtkfilechooserwidget.c